﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;


public partial class sysadmin_CountManager_ProjectCount : PowerCreator.LMS.Web.Base.BasePage
{
    //PowerCreator.LMS.Logic.ProjectManager.ManagerProjectInfo projectManager = new PowerCreator.LMS.Logic.ProjectManager.ManagerProjectInfo();
    //PowerCreator.LMS.Logic.CourseManager.ManagerCourseInfo courseManager = new PowerCreator.LMS.Logic.CourseManager.ManagerCourseInfo();
    //PowerCreator.LMS.Logic.CourseManager.ManagerResourceInfo resourceManager = new PowerCreator.LMS.Logic.CourseManager.ManagerResourceInfo();
    //PowerCreator.LMS.Logic.ProjectManager.ManagerClassInfo classManager = new PowerCreator.LMS.Logic.ProjectManager.ManagerClassInfo();
    
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BinderPG();            
        }
    }
    private void BinderPG()
    {
        //ChartControl1.Background.Color = Color.SlateGray;
        //ChartControl1.PlotBackground.Color = Color.White;
        //ChartControl1.Legend.Background.Color = Color.White;
        //ChartControl1.Border.Color = Color.DarkBlue;
        //ChartControl1.Legend.Border.Color = ChartControl1.Border.Color;
        //ChartControl1.YCustomEnd = float.Parse("1.0");

        //WebChart.Chart c1 = new WebChart.StackedColumnChart(CC(), Color.Red);
        //WebChart.StackedColumnChart st = new WebChart.StackedColumnChart();
        //st.Line.Width = float.Parse("2.0");
        //c1.Legend = "方案总数 ";
        //c1.Fill.Color = Color.FromArgb(10,Color.DarkBlue);        
        //c1.LineMarker = new WebChart.SquareLineMarker(6,c1.Fill.Color,c1.Line.Color);
        //ChartControl1.Charts.Add(c1);
        

        //WebChart.Chart c2 = new WebChart.StackedColumnChart(CreatedData(), Color.Cyan);
        //c2.Legend = "方案班级总数";
        //c2.Fill.Color = Color.FromArgb(10, Color.DarkBlue);
        //c2.LineMarker = new WebChart.SquareLineMarker(6, c2.Fill.Color, c2.Line.Color);
        //ChartControl1.Charts.Add(c2);

        //WebChart.Chart c3 = new WebChart.StackedColumnChart(CreatedData(), Color.Black);
        //c3.Legend = "课程总数 ";
        //c3.Fill.Color = Color.FromArgb(10, Color.DarkBlue);
        //c3.LineMarker = new WebChart.SquareLineMarker(6, c3.Fill.Color, c3.Line.Color);
        //ChartControl1.Charts.Add(c3);

        //WebChart.Chart c4 = new WebChart.StackedColumnChart(CreatedData(), Color.Blue);
        //c4.Legend = "资源总数 ";
        //c4.Fill.Color = Color.FromArgb(10, Color.DarkBlue);
        //c4.LineMarker = new WebChart.SquareLineMarker(6, c4.Fill.Color, c4.Line.Color);
        //ChartControl1.Charts.Add(c4);

        //ChartControl1.RedrawChart();        
    }
    private WebChart.ChartPointCollection CC()
    {
        WebChart.ChartPointCollection data = new WebChart.ChartPointCollection();
        data.Add(GetProjectCount());
        return data;
    }

    private WebChart.ChartPointCollection CreatedData()
    {
        WebChart.ChartPointCollection data = new WebChart.ChartPointCollection();
        
        data.Add(GetProjectCount());
        
        data.Add(GetProjectClassCount());
        data.Add(GetCourseCount());
        data.Add(GetResourceCount());
        return data;
    }

    private WebChart.ChartPoint GetProjectCount()
    {        
        WebChart.ChartPoint c1 = new WebChart.ChartPoint();        
      // c1.XValue = "总方案个数";
       // c1.YValue = float.Parse(projectManager.Count("").ToString());
        return c1;
    }
    private WebChart.ChartPoint GetProjectClassCount()
    {     
        WebChart.ChartPoint c1 = new WebChart.ChartPoint();
       // c1.XValue = "总班级个数";
        //c1.YValue = float.Parse(classManager.Count("").ToString());
        return c1;
    }
    private WebChart.ChartPoint GetCourseCount()
    {     
        WebChart.ChartPoint c1 = new WebChart.ChartPoint();
       // c1.XValue = "总课程个数";
       // c1.YValue = float.Parse(courseManager.Count("").ToString());
        return c1;
    }
    private WebChart.ChartPoint GetResourceCount()
    {     
        WebChart.ChartPoint c1 = new WebChart.ChartPoint();
       // c1.XValue = "总资源个数";
       // c1.YValue = float.Parse(resourceManager.Count("").ToString());       
        return c1;
    }
}

